<!--
 * @Author: fengweicong 75202172+fengweicong@users.noreply.github.com
 * @Date: 2022-07-12 19:05:21
 * @LastEditors: fengweicong 75202172+fengweicong@users.noreply.github.com
 * @LastEditTime: 2022-07-27 15:52:53
 * @FilePath: \大宗买卖\ebuy\src\views\Pay\index.vue
 * @Description: 
 * 
 * Copyright (c) 2022 by fengweicong 75202172+fengweicong@users.noreply.github.com, All Rights Reserved. 
-->
<template>
  <div class="pay">
    <el-button type="primary" @click="pay">付款</el-button>
  </div>
</template>

<script>
export default {
    name: 'pay',
    methods: {
        pay() {
            this.$API.getOneProductOrder(this.$store.state.params.oid).then(res => {
                if (res.status == 200) {
                    res.data.deal_status = 1
                    return this.$API.modifyProductOrder(res.data, res.data.id)
                }
            }).then(res => {
                if (res.status == 200) {
                    this.$message.success('支付成功')
                }
            })
        }
    },
    created() {

    }
}
</script>

<style lang="less" scoped>
.pay{
    height: 100px;
    display: flex;
    align-items: center;
    justify-content: center;
}
</style>